<template>
  <div class="useradmin-box">
    <el-card class="box-card">
      <!-- 数据列表  -->
      <div class="useradmin-search">
        <el-row :gutter="5">
          <el-col :span="4"><el-input v-model="input" placeholder="请输用户名"></el-input></el-col>
          <el-col :span="3"
            ><!-- 下拉 -->
            <el-select v-model="value" placeholder="账户类型">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option> </el-select
          ></el-col>

          <el-col :span="3">
            <el-select v-model="value" placeholder="评论状态">
              <el-option
                v-for="item in options2"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-col>
          <el-col :span="2"
            ><el-button type="primary" icon="el-icon-search">搜索</el-button></el-col
          >
        </el-row>
      </div>
      <!-- table -->
      <el-table :data="tableData" style="width: 100%">
        <el-table-column width="50" type="selection"></el-table-column>
        <el-table-column label="序号" width="50" type="index"></el-table-column>
        <el-table-column prop="name" label="头像" width="120"> </el-table-column>
        <el-table-column prop="province" label="昵称" width="120"></el-table-column>
        <el-table-column prop="city" label="账号来源" width="120"> </el-table-column>
        <el-table-column prop="address" label="评论状态" width="300"> </el-table-column>
        <el-table-column prop="zip" label="用户标签" width="120"> </el-table-column>
        <el-table-column label="登录次数" width="100"></el-table-column>
        <el-table-column label="登录IP" width="100"></el-table-column>
        <el-table-column label="操作系统" width="100"></el-table-column>
        <el-table-column label="浏览器" width="100"></el-table-column>
        <el-table-column label="最后登录时间" width="100"></el-table-column>
        <el-table-column label="邮箱" width="100"></el-table-column>
        <el-table-column label="IP来源" width="100"></el-table-column>
        <el-table-column label="状态" width="100"></el-table-column>
        <el-table-column label="操作" width="200" fixed="right"></el-table-column>
      </el-table>
      <!-- 页码 -->
      <div class="block">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="1"
          :page-sizes="[5, 10, 15, 20]"
          :page-size="10"
          layout="total, sizes, prev, pager, next, jumper"
          :total="114"
        >
        </el-pagination>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  methods: {
    handleClick(row) {
      console.log(row);
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },

  data() {
    return {
      input: '',
      currentPage1: 5,
      value: '',
      options: [
        {
          value: '选项1',
          label: 'QQ',
        },
        {
          value: '选项2',
          label: 'GITHBU',
        },
        {
          value: '选项3',
          label: 'GITEE',
        },
        {
          value: '选项4',
          label: 'MOGU',
        },
      ],
      options2: [
        {
          value: '选项1',
          label: '正常',
        },
        {
          value: '选项2',
          label: '禁言',
        },
      ],

      tableData: [
        {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333,
        },
        {
          date: '2016-05-04',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1517 弄',
          zip: 200333,
        },
        {
          date: '2016-05-01',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1519 弄',
          zip: 200333,
        },
        {
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
        },
        {
          date: '2016-05-03',
          name: '王小虎1',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
        },
        {
          date: '2016-05-03',
          name: '王小虎2',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
        },
        {
          date: '2016-05-03',
          name: '王小虎3',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
        },
        {
          date: '2016-05-03',
          name: '王小虎4',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
        },
        {
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
        },
        {
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
        },
        {
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
        },
        {
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
        },
      ],
    };
  },
};
</script>
